from urllib.parse import quote_plus as urlquote
import logging
class BaseConfig:
    # 默认后台主题
    DEFAULT_THEME = "dasho"
    """
    配置文件
    """
    # 数据库的配置信息
    # SQLALCHEMY_DATABASE_URI = 'sqlite:///../demo.db'

    # mysql 配置
    MYSQL_USERNAME = "root"
    MYSQL_PASSWORD = "123456"
    MYSQL_HOST = "127.0.0.1"
    MYSQL_PORT = 3306
    MYSQL_DATABASE = "demo"
    SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://{MYSQL_USERNAME}:{urlquote(MYSQL_PASSWORD)}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DATABASE}?charset=utf8mb4"

    # 配置默认的log等级
    LEVEL_NAME = logging.DEBUG